#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<vector>
#include<utility>

using namespace std;

int main() {
    vector<pair<char, int>> input;
    char tmp;

    while (cin >> tmp) {
        int flag = 0;
        pair<char, int> buffer(tmp, 1);
        for (auto& e : input) {
            if (e.first == tmp) {
                flag = 1;
                e.second++;
                break;
            }
        }
        if (!flag)input.push_back(buffer);
    }
    for (auto& e : input) {
        if (e.second == 1) {
            cout << e.first;
            return 0;
        }
    }
    cout << -1;
    return 0;
}